/*
 * cryptObject.h
 *
 *  Created on: 21.03.2009
 *      Author: Christian Stupp
 */

#ifndef CRYPTOBJECT_H_
#define CRYPTOBJECT_H_

#include <string>
#include <stdlib.h>
#include <iostream>
#include <openssl/rc4.h>
#include <openssl/aes.h>
#include <openssl/md5.h>
#include "staticObject.h"
#include "debuger.h"

namespace oal{
	class cryptObject: public staticObject{
	private:
		std::string _method;
		std::string  _key;
		std::string  _md5Value;

	public:
		cryptObject(std::string method = "rc4", std::string key="");
		virtual ~cryptObject();
		std::string getType(void);
		void setKey(std::string key);
		void setRsaKey(std::string key);
		std::string performCryption(std::string content);
		void stringToChar(unsigned char *destination, std::string source);
		std::string getMd5ToAuthentificate(void);
		static std::string md5(std::string);

	};
};
#endif /* CRYPTOBJECT_H_ */
